<?php
namespace app\miniprogram\controller;

/**
 * 针对人群列表
 */
class Test extends Base
{
    protected $noNeedLogin = ['*'];
	protected $process = 'Order';

    public function activity() {
        echo loader()->loadAny('activity')->index('Balance', 1000);
    }

    /*
    public function index () {
        $this->ajax_process(function($process, $user){
            $order = loadModel('jy\\Order')->find(415);
            return $process->wechat_send_product($order, ['tracking' => '123123123']);
        });
    }

    public function send_order_pay() {
        $result = loadTool('Wechat')->send_order_pay();
        return $result;
    }

    public function get_access_token() {
        $result = loadTool('Wechat')->get_access_token();
        var_dump($result);
    }

    public function profit_sharing() {
        $app = loadTool('Wechat')->payment();
        $result = $app->profit_sharing->share('4200002642202505167394225353', 'order17473814768307', [
            [
                "type"        => "PERSONAL_OPENID",
                "account"     => "oEEhh7NKh9wAY-XChFf6VUJqnLuA",
                "amount"      => 3000,
                "description" => "分到商户"
            ]
        ]);
        var_dump($result);
        return;
    	
    }

    public function getui() {
        $uid = $this->request->post('uid');
        $result = loadTool('Getui')->push($uid);
        $result['uid'] = $uid;
        $this->success('', $result);
    }

    public function is_test() {
        $code = $this->request->get('code');
        preg_match_all('/([A-Z]+)(?=\d)/', $code, $matches);
        var_dump($matches[0][0]);
    }
    */
}
